<?php
namespace App\Services\Export;

use App\Services\Export\WordAbstract;

class WordNotice extends WordAbstract
{
    public function set($data = [],$imgData = [])
    {
        if(count($data)) {
            foreach ($data as $k => $v) {
                $this->templateProcessor->setValue($k,$v);
            }
        }
        if(count($imgData)) {
            foreach ($imgData as $k => $v) {
                $width = isset($v['width'])?$v['width']:80;
                $height = isset($v['height'])?$v['height']:60;
                if($v['path'] == '.') {
                    $this->templateProcessor->setValue($k,'');
                } else {
                    $this->templateProcessor->setImageValue($k,
                        array('path' => $v['path'], 'width' => $width, 'height' => $height)
                    );
                }
                
            }
            
        }
        
        
    }
}